home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 82 / 082.d81 / waist control (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1991-01-01  |  15.9 KB  |  561 lines

  1. 1 y=828:n=53280:ifpeek(49152)<>240thenload"dfont1",8,1
  2. 2 ifpeek(51200)<>240thenload"dfont2",8,1
  3. 3 ifpeek(y)<>24thensys57812"ss 1990",8:poke780,0:poke781,60:poke782,3:sys65493
  4. 4 poken,.:poken+1,.:poken+2,5:poken+3,3:poken+4,7:s=56320:x=1
  5. 5 printchr$(14)"[147][159]    [175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
  6. 6 print"[154]     [210]eading [196]isk... [208]lease [215]ait... "
  7. 7 print"    [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]":gosub407:a$=chr$(13)
  8. 8 dimh$(15),c$(26),i$(328),a%(4,50),c%(4,50),e%(4,50),s%(4,328),l%(4),t%(27)
  9. 9 dimp%(328),w$(12),a$(8),b$(8),p$(65),d$(5),e$(5),f$(4),g$(4),j$(6),k$(1)
  10. 10 open2,8,2,"0:dfiles":fory=1to15:input#2,h$(y):next:fory=.to25
  11. 11 input#2,c$(y):next:fory=.to328:input#2,i$(y),p%(y):next
  12. 12 fory=.to8:input#2,a$(y),b$(y):next:fory=.to12:input#2,w$(y):next
  13. 13 fory=1to65:input#2,p$(y):next:close2:fory=.to5:readd$(y),e$(y):next
  14. 14 fory=.to4:readf$(y),g$(y):next:fory=.to27:readt%(y):next
  15. 15 fory=54272to54296:pokey,.:next
  16. 16 fory=.to6:readj$(y):next:fory=.to1:readk$(y):next
  17. 17 fory=54272to54278:readv:pokey,v:next:v=54296
  18. 18 i$(.)="                                       ":p$(.)="                    "
  19. 19 print"[147]"chr$(142):poke56576,peek(56576)and252:poken-8,18
  20. 20 poken-15,peek(n-15)or64:poke648,196:print"[147]":ifpeek(827)<>13thengosub400
  21. 21 gosub464:gosub539
  22. 22 r=4:p=5:gosub271:print"[144][255][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][223]"
  23. 23 fory=.to17:printtab(5)"[188][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][190]":next
  24. 24 gosub271:fory=.to8:printtab(21-(len(a$(y)))/2)""b$(y):next
  25. 25 r=22:p=4:gosub271:print"[144]^cursor / joystick to highlight_"
  26. 26 printtab(4)"[144](   return or fire to engage   )"
  27. 27 te=.:r=5:gosub546:print""a$(te)
  28. 28 gosub272:ifte=5thengosub296:goto28
  29. 29 ifte=6thensys828,1:gosub268:sys831,1:goto28
  30. 30 ifte=8thensys828,1:sp=p:gosub197:p=sp:sys831,1:goto28
  31. 31 ifte=7thensys828,1:gosub406:sys831,1:goto28
  32. 32 a=te:y=l%(a):sys828,1:i=1:x=1:mr=r:mp=p:gosub33:goto28
  33. 33 print"[147]":r=15:p=0:gosub271:form=.to4:print""spc(m)w$(m):next
  34. 34 r=7:p=1:form=5to11:gosub271:r=r+1:ifm=8thenr=r+1
  35. 35 printw$(m):next:gosub67
  36. 36 gosub457:getx$:ifx$=a$thengosub454:gosub45:goto39
  37. 37 ifx$="[145]"thengosub63:goto36
  38. 38 ifx$=""thengosub65:goto36
  39. 39 ifx$="r"thenl%(a)=y:gosub454:sys831,1:r=mr:p=mp:return
  40. 40 ifx$="+"orx$="-"thengosub153:ify=50thenl%(a)=y:sys831,1:r=mr:p=mp:return
  41. 41 ifx$="c"andqthengosub454:gosub152:goto36
  42. 42 ifx$="c"andq=.thengosub454:gosub150
  43. 43 ifx$="t"thengosub454:gosub268
  44. 44 goto36
  45. 45 onxgoto47,48,49,50,51,52,53,54,55,56,57,58,59,60
  46. 46 x$="r":return
  47. 47 i=48:goto62
  48. 48 i=72:goto62
  49. 49 i=94:goto62
  50. 50 i=106:goto62
  51. 51 i=134:goto62
  52. 52 i=184:goto62
  53. 53 i=191:goto62
  54. 54 i=193:goto62
  55. 55 i=196:goto62
  56. 56 i=226:goto62
  57. 57 i=247:goto62
  58. 58 i=265:goto62
  59. 59 i=289:goto62
  60. 60 i=301:goto62
  61. 61 x$="r":return
  62. 62 x=x+1:gosub69:return
  63. 63 ifi=1thengosub453:return
  64. 64 i=i-1:gosub78:gosub70:return
  65. 65 ifi=328thengosub453:return
  66. 66 i=i+1:gosub95:gosub70:return
  67. 67 z$=mid$(a$(a),4,len(a$(a))-4):z$="[144]@"+z$+"[144]\"
  68. 68 r=0:p=0:gosub271:printi$(.):p=(21-(len(a$(a)))/2):gosub271:print""z$
  69. 69 r=1:p=12:gosub271:print"[154]"h$(x)
  70. 70 r=2:p=0:gosub271:printi$(.)"":p=(20-(len(i$(i)))/2):gosub271:printi$(i)
  71. 71 c=x:ifx=12orx=13orx=14thengosub126
  72. 72 r=3:p=8:gosub271:print"[155]    calories per serving":gosub271:printc$(c)
  73. 73 r=4:p=0:gosub271:print"[155]"i$(.)
  74. 74 p=(40-(14+len(p$(p%(i)))))/2:gosub271:print"serving size: "p$(p%(i))
  75. 75 r=5:p=9:gosub271:print"[159]number of servings: "s%(a,i)
  76. 76 ifqthengosub150
  77. 77 return
  78. 78 onxgoto79,80,81,82,83,84,85,86,87,88,89,90,91,92,93
  79. 79 ifi<47thenreturn
  80. 80 ifi>47thenreturn
  81. 81 ifi>71thenreturn
  82. 82 ifi>93thenreturn
  83. 83 ifi>105thenreturn
  84. 84 ifi>133thenreturn
  85. 85 ifi>183thenreturn
  86. 86 ifi>190thenreturn
  87. 87 ifi>192thenreturn
  88. 88 ifi>195thenreturn
  89. 89 ifi>225thenreturn
  90. 90 ifi>246thenreturn
  91. 91 ifi>264thenreturn
  92. 92 ifi>288thenreturn
  93. 93 ifi>300thenreturn
  94. 94 i=i+1:gosub453:return
  95. 95 onxgoto96,98,100,102,104,106,108,110,112,114,116,118,120,122,124
  96. 96 ifi<48thenreturn
  97. 97 goto125
  98. 98 ifi<72thenreturn
  99. 99 goto125
  100. 100 ifi<94thenreturn
  101. 101 goto125
  102. 102 ifi<106thenreturn
  103. 103 goto125
  104. 104 ifi<134thenreturn
  105. 105 goto125
  106. 106 ifi<184thenreturn
  107. 107 goto125
  108. 108 ifi<191thenreturn
  109. 109 goto125
  110. 110 ifi<193thenreturn
  111. 111 goto125
  112. 112 ifi<196thenreturn
  113. 113 goto125
  114. 114 ifi<226thenreturn
  115. 115 goto125
  116. 116 ifi<247thenreturn
  117. 117 goto125
  118. 118 ifi<265thenreturn
  119. 119 goto125
  120. 120 ifi<289thenreturn
  121. 121 goto125
  122. 122 ifi<301thenreturn
  123. 123 goto125
  124. 124 ifi<329thenreturn
  125. 125 i=i-1:gosub453:return
  126. 126 ifx=12thenc=11:return
  127. 127 ifx=14then143
  128. 128 ifi>265andi<276thenc=16:return
  129. 129 ifi<276thenreturn
  130. 130 oni-275goto131,132,133,134,135,136,137,139,132,139,140,141:return
  131. 131 c=17:return
  132. 132 c=18:return
  133. 133 c=19:return
  134. 134 c=20:return
  135. 135 c=21:return
  136. 136 c=22:return
  137. 137 c=23:return
  138. 138 c=24:return
  139. 139 c=1:return
  140. 140 c=14:return
  141. 141 c=25:return
  142. 142 return
  143. 143 ifi<289thenreturn
  144. 144 oni-288goto145,146,147,148,148,147,147,149,147,148,149,147:return
  145. 145 c=22:return
  146. 146 c=.:return
  147. 147 c=16:return
  148. 148 c=1:return
  149. 149 c=13:return
  150. 150 r=16:p=27:gosub271:print"[144]@calories[144]\"
  151. 151 printspc(29)"      [157][157][157][157][157][157]"b:q=1:return
  152. 152 r=16:p=27:gosub271:print"          ":printspc(29)"      ":q=.:return
  153. 153 t=s%(a,i):ifx$="+"thent=t+1:ift=10thent=0
  154. 154 ifx$="-"thent=t-1:ift=-1thent=9
  155. 155 gosub454:ift=s%(a,i)thenreturn
  156. 156 ifs%(a,i)=.then158
  157. 157 goto161
  158. 158 ifx=12thend=d+t
  159. 159 a%(a,y)=i:e%(a,y)=t:c%(a,y)=val(c$(c)):b=b+(t*c%(a,y)):gosub438:s%(a,i)=t
  160. 160 gosub75:y=y+1:return
  161. 161 forw=.to24:ifa%(a,w)=itheng=w
  162. 162 next
  163. 163 ift=.then167
  164. 164 ift<s%(a,i)then170
  165. 165 h=t-s%(a,i):s%(a,i)=t:e%(a,g)=t:b=b+(h*c%(a,g)):gosub438:ifx=12thend=d+h
  166. 166 gosub75:return
  167. 167 b=b-(s%(a,i)*c%(a,g)):s%(a,i)=.:gosub75:ifx=12thend=d-e%(a,g)
  168. 168 forh=gto24:c%(a,h)=c%(a,h+1):e%(a,h)=e%(a,h+1):a%(a,h)=a%(a,h+1):next
  169. 169 y=y-1:return
  170. 170 h=s%(a,i)-t:s%(a,i)=t:e%(a,g)=t:b=b-(h*c%(a,g)):ifx=12thend=d-h
  171. 171 gosub75:return
  172. 172 gosub395:ifx$="n"thenreturn
  173. 173 p=3:gosub271:print"[144]@clearing memory...please wait...\":b=.:d=.
  174. 174 fore=.to4:ifl%(e)=.then177
  175. 175 l%(e)=.:forz=.to25:a%(e,z)=.:c%(e,z)=.:e%(e,z)=.:next
  176. 176 forz=.to328:s%(e,z)=.:next
  177. 177 next:return
  178. 178 ifl%(a)=.thenp=6:gosub271:print"[158]@[153]that meal is not in memory[158]\"
  179. 179 z=l%(a)-1:z1=.:ifl%(a)=.thengosub543:return
  180. 180 z$=mid$(a$(a),4,len(a$(a))-4):z$="[144]@"+z$+"[144]\"
  181. 181 print"[147][144]"tab(21-(len(z$))/2)z$""
  182. 182 jj=.:fore=z1toz1+9:ifa%(a,e)=.thene=z1+9:jj=1:goto184
  183. 183 gosub191
  184. 184 next:ifjjora%(a,e)=.thengosub189
  185. 185 printtab(2)"[144]"w$(12)
  186. 186 gosub350
  187. 187 ifjjora%(a,e)=.thenreturn
  188. 188 z1=e:goto181
  189. 189 k=.:fore=.toz:k=k+(c%(a,e)*e%(a,e)):next
  190. 190 print"[158]      calories for this meal:"k:return
  191. 191 gosub440
  192. 192 print"[157]"e%(a,e);:ife%(a,e)=1thenprint"serving";:goto194
  193. 193 print"servings";
  194. 194 ifp%(a%(a,e))=55thenprint:goto196
  195. 195 print" of "p$(p%(a%(a,e)))" each"
  196. 196 return
  197. 197 p=6:gosub271:print"[158]@[144]choose new person   [y/n]?[158]\":gosub556
  198. 198 ifx$="y"then21
  199. 199 gosub271:print"[158]@[144]return to loadstar  [y/n]?[158]\"
  200. 200 getx$:ifx$<>"y"andx$<>"n"then200
  201. 201 gosub454:ifx$="n"thenreturn
  202. 202 print"[147]":fory=54272to54296:pokey,.:next
  203. 203 poke56576,199:poke53280-8,21:poke53280-15,27:poke648,4
  204. 204 printchr$(142)"[147][159]booting loadstar...[144]"
  205. 205 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  206. 206 ifer<>63thenprint"[159]not found!":end
  207. 207 print"load"chr$(34)"hello connect"chr$(34)",8"
  208. 208 poke631,131:poke198,1:end
  209. 209 print"[147]        [144]@i n f o r m a t i o n[144]\"
  210. 210 print"[155]   it's good to eat food high in fiber,"
  211. 211 print"low in sodium, cholesterol, saturated"
  212. 212 print"fat, or added sugar.  bake, roast, boil,";
  213. 213 print"grill, or broil food.  use nonstick"
  214. 214 print"spray/pans to brown or fry food."
  215. 215 print"[144]meat$[146][155] trim off visible fat.  weigh after";
  216. 216 print"removing bones and cooking.  do not add"
  217. 217 print"flour, bread crumbs, coating mixes or"
  218. 218 print"fat when cooking.  high-fat meat should"
  219. 219 print"be limited to 3 times per week.  prime"
  220. 220 print"cuts are high in fat and calories."
  221. 221 print"[144]vegetables$[146][155] rinsing canned vegetables"
  222. 222 print"reduces the sodium content."
  223. 223 print"[144]fat$[146][155] from butter to the end of the list"
  224. 224 print"are saturated fats.":printtab(2)"[144]"w$(12):gosub350
  225. 225 print"[147]        [144]@i n f o r m a t i o n[144]\"
  226. 226 print"[144]fruits$[146][155] use frozen or canned without"
  227. 227 print"sugar.  canned fruit should be packed in";
  228. 228 print"water.  if it is packed in juice, the"
  229. 229 print"juice should be counted as a separate"
  230. 230 print"item.  whole fruit is more filling than"
  231. 231 print"juice and is better for someone trying  to lose weight."
  232. 232 print"[144]free foods/lmtd$[146][155] adds up to 20 calories"
  233. 233 print"per serving.  limit these to 3 servings"
  234. 234 print"per day.  these calories will be added"
  235. 235 print"in the printed diet plan for the day."
  236. 236 print"[144]microwave$[146][155] using the microwave, you can"
  237. 237 print"cook fresh vegetables using a very small";
  238. 238 print"amount of water.  this method keeps more";
  239. 239 print"of the nutrients and flavor in.  when"
  240. 240 print"using the microwave for any cooking, do"
  241. 241 print"not add salt before cooking.  this will"
  242. 242 print"dry up the food being cooked.":printtab(2)"[144]"w$(12)
  243. 243 gosub350:return
  244. 244 e=1:fora=.to4:ifl%(a)<>.thene=.
  245. 245 next:p=8:ifethengosub271:print"[158]@[144]no meal is in memory[158]\"
  246. 246 ifethengosub543:return
  247. 247 gosub271:printk$(.)
  248. 248 gosub457:getx$:xx=xx+1:gosub352:ifx$=""then248
  249. 249 gosub454:gosub356:p=7:gosub308
  250. 250 open4,4:print#4,"diet plan for "d$", "c$:a=.
  251. 251 gosub257:a=a+1:ifa=5then253
  252. 252 goto251
  253. 253 ifd>2thenb=b+50:gosub438:d=d-3:goto253
  254. 254 print#4:print#4,"total calories for the day:"b
  255. 255 ifclandcl<bthenprint#4,"you are"b-cl"calories over your limit!"
  256. 256 print#4:close4:return
  257. 257 ifl%(a)=.thenreturn
  258. 258 print#4:o$=mid$(a$(a),4,len(a$(a))-4)
  259. 259 print#4,spc(10)o$
  260. 260 k=.:fore=.tol%(a)-1:gosub382
  261. 261 print#4,"-->";
  262. 262 print#4,e%(a,e);:ife%(a,e)=1thenprint#4,"serving";:goto264
  263. 263 print#4,"servings";
  264. 264 ifp%(a%(a,e))=55thenprint#4:goto266
  265. 265 print#4," of "p$(p%(a%(a,e)))" each"
  266. 266 k=k+(c%(a,e)*e%(a,e)):next
  267. 267 print#4,"calories for this meal:"k:return
  268. 268 ifpeek(n-8)=17thenpoken-8,19:goto270
  269. 269 poken-8,17
  270. 270 return
  271. 271 poke781,r:poke782,p:poke783,.:sys65520:return
  272. 272 gosub398:ifx$=""thengosub276
  273. 273 ifx$="[145]"thengosub279
  274. 274 ifx$=a$thengosub454:return
  275. 275 goto272
  276. 276 gosub546:print""b$(te)
  277. 277 te=te+1:r=r+2:ifte=9thente=0:r=5
  278. 278 gosub546:print""a$(te):return
  279. 279 gosub546:print""b$(te)
  280. 280 te=te-1:r=r-2:ifte=-1thente=8:r=21
  281. 281 gosub546:print""a$(te):return
  282. 282 data"@[144]information\","[192][144][201][206][198][207][210][205][193][212][201][207][206][220]","@[144]display meal\"
  283. 283 data"[192][144][196][201][211][208][204][193][217][160][205][197][193][204][220]"
  284. 284 data"@[144]clear memory\","[192][144][195][204][197][193][210][160][205][197][205][207][210][217][220]","@[144]set calories\"
  285. 285 data"[192][144][211][197][212][160][195][193][204][207][210][201][197][211][220]"
  286. 286 data"@[144]print diet\","[192][144][208][210][201][206][212][160][196][201][197][212][220]","@[144]return\","[192][144][210][197][212][213][210][206][220]"
  287. 287 data"[159]@[144]b r e a k f a s t[159]\","[159][192][144][194][160][210][160][197][160][193][160][203][160][198][160][193][160][211][160][212][159][220]"
  288. 288 data"[159]@[144]l u n c h[159]\","[159][192][144][204][160][213][160][206][160][195][160][200][159][220]","[159]@[144]d i n n e r[159]\","[159][192][144][196][160][201][160][206][160][206][160][197][160][210][159][220]"
  289. 289 data"[159]@[144]s n a c k   o n e[159]\","[159][192][144][211][160][206][160][193][160][195][160][203][160][160][160][207][160][206][160][197][159][220]"
  290. 290 data"[159]@[144]s n a c k   t w o[159]\","[159][192][144][211][160][206][160][193][160][195][160][203][160][160][160][212][160][215][160][207][159][220]"
  291. 291 data34,50,52,53,59,61,68,84,85,93,126,130,139,140,155,171,172
  292. 292 data174,175,226,245,251,257,287,288,299,324,326
  293. 293 datasunday,monday,tuesday,wednesday,thursday,friday,saturday
  294. 294 data"[158]@[144] turn on your printer [158]\","[158]@[144]press a key when ready[158]\"
  295. 295 data255,4,,8,65,,240
  296. 296 tr=r:tp=p:sys828,1:r=4:p=11:gosub271:print"[158][255][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][223]"
  297. 297 fory=.to10:r=r+1:gosub271:print"[188][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][190]":next
  298. 298 r=r+1:gosub271:print"[168][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][169]"
  299. 299 r=5:p=13:fory=.to5:gosub271:print""e$(y):r=r+2:next
  300. 300 t1=.:r=5:p=13:gosub271:print""d$(t1)
  301. 301 gosub398:ifx$=""thengosub316
  302. 302 ifx$="[145]"thengosub318
  303. 303 ifx$=a$thengosub454:r1=r:p1=p:sys828,2:goto305
  304. 304 goto301
  305. 305 ift1=5thensys831,1:r=tr:p=tp:return
  306. 306 ont1+1gosub209,366,172,418,244
  307. 307 sys831,2:r=r1:p=p1:goto301
  308. 308 l=1:l$=str$(l):gosub320
  309. 309 gosub271:print"[158]@month:   day:   year:   [158]\":p=p+7
  310. 310 gosub271:print"[158]"l$:gosub322
  311. 311 c$=l$+"/":l=1:l$=str$(l):gosub320
  312. 312 p=p+7:gosub271:print"[158]"l$:gosub328
  313. 313 c$=c$+l$+"/":l=90:l$=str$(l):gosub320
  314. 314 p=p+8:gosub271:print"[158]"l$:gosub332
  315. 315 c$=c$+l$:p=6:gosub271:print"[158]@[144]printing diet-please wait![158]\":return
  316. 316 gosub271:print""e$(t1):t1=t1+1:r=r+2:ift1=6thent1=0:r=5
  317. 317 goto327
  318. 318 gosub271:print""e$(t1):t1=t1-1:r=r-2:ift1=-1thent1=5:r=15
  319. 319 goto327
  320. 320 ifl<10thenl$="0"+right$(l$,1):return
  321. 321 l$=right$(l$,2):return
  322. 322 gosub398:ifx$=""thengosub338
  323. 323 ifx$="[145]"thengosub340
  324. 324 ifx$=a$thengosub454:return
  325. 325 goto322
  326. 326 gosub271:print""e$(t1):t1=t1-1:r=r-2:ift1=-1thent1=5:r=15
  327. 327 gosub271:print""d$(t1):return
  328. 328 gosub398:ifx$=""thengosub342
  329. 329 ifx$="[145]"thengosub344
  330. 330 ifx$=a$thengosub454:return
  331. 331 goto328
  332. 332 gosub398:ifx$=""thengosub346
  333. 333 ifx$="[145]"thengosub348
  334. 334 ifx$=a$thengosub454:goto336
  335. 335 goto332
  336. 336 ifl<90thenl$="20"+l$:return
  337. 337 l$="19"+l$:return
  338. 338 l=l+1:ifl=13thenl=1
  339. 339 goto542
  340. 340 l=l-1:ifl=.thenl=12
  341. 341 goto542
  342. 342 l=l+1:ifl=32thenl=1
  343. 343 goto542
  344. 344 l=l-1:ifl=.thenl=31
  345. 345 goto542
  346. 346 l=l+1:ifl=100thenl=0
  347. 347 goto542
  348. 348 l=l-1:ifl=-1thenl=99
  349. 349 goto542
  350. 350 gosub457:getx$:ifx$=""then350
  351. 351 gosub454:return
  352. 352 ifxx<25thenreturn
  353. 353 xx=.:ifx1=.thenx1=1:goto355
  354. 354 x1=.
  355. 355 gosub271:printk$(x1):return
  356. 356 l=.:gosub271:print"[158]@day of week:          [158]\"
  357. 357 p=p+14:gosub271:print"[158]"j$(l)
  358. 358 gosub398:ifx$=""thengosub362
  359. 359 ifx$="[145]"thengosub364
  360. 360 ifx$=a$thengosub454:d$=j$(l):return
  361. 361 goto358
  362. 362 gosub271:print"         ":l=l+1:ifl=7thenl=.
  363. 363 gosub271:print"[158]"j$(l):return
  364. 364 gosub271:print"         ":l=l-1:ifl=-1thenl=6
  365. 365 gosub271:print"[158]"j$(l):return
  366. 366 r=5:p=9:gosub271:print"[158]^                    _"
  367. 367 fory=.to8:r=r+1:gosub271:print"<                    >":next
  368. 368 r=r+1:gosub271:print"(                    )"
  369. 369 r=6:fory=.to4:p=(21-(len(f$(y)))/2):gosub271:r=r+2:print""f$(y):next
  370. 370 sd=.:r=6:p=(21-(len(g$(sd)))/2):gosub271:print""g$(sd)
  371. 371 gosub398:ifx$=""thengosub376
  372. 372 ifx$="[145]"thengosub379
  373. 373 ifx$=a$thengosub454:goto375
  374. 374 goto371
  375. 375 a=sd:gosub178:return
  376. 376 p=(21-(len(f$(sd)))/2):gosub271:print""f$(sd)
  377. 377 sd=sd+1:r=r+2:ifsd=5thensd=0:r=6
  378. 378 p=(21-(len(g$(sd)))/2):gosub271:print""g$(sd):return
  379. 379 p=(21-(len(f$(sd)))/2):gosub271:print""f$(sd)
  380. 380 sd=sd-1:r=r-2:ifsd=-1thensd=4:r=14
  381. 381 p=(21-(len(g$(sd)))/2):gosub271:print""g$(sd):return
  382. 382 o=a%(a,e)
  383. 383 ifo=94oro=105oro=226thenprint#4,right$(i$(o),len(i$(o))-4);:return
  384. 384 ifo>12ando<22then393
  385. 385 ifo<3then393
  386. 386 ifo>94ando<105then393
  387. 387 ifo>87ando<91then393
  388. 388 ifo>165ando<169then393
  389. 389 ifo>276ando<286then393
  390. 390 ts=1:fortt=.to27:ift%(tt)=othengosub394:ts=.:t=27
  391. 391 next:ifts=.thenreturn
  392. 392 print#4,i$(o);:return
  393. 393 gosub394:return
  394. 394 print#4,right$(i$(o),len(i$(o))-3);:return
  395. 395 p=9:gosub271:print"[158]@[144]are you sure  [y/n]?[158]\"
  396. 396 getx$:ifx$<>"y"andx$<>"n"then396
  397. 397 gosub454:poke198,.:return
  398. 398 gosub457:getx$:ifx$<>""andx$<>"[145]"andx$<>a$then398
  399. 399 return
  400. 400 print"[147]";:open2,8,2,"0:dscreen1"
  401. 401 fory=.to24:input#2,k$:printk$;:next:print:close2
  402. 402 gosub455:sys828,4:gosub454
  403. 403 print"[147]";:open2,8,2,"0:dscreen2"
  404. 404 fory=.to24:input#2,k$:printk$;:next:print:close2
  405. 405 gosub455:sys828,5:gosub454:poke827,13:return
  406. 406 sys831,4:gosub455:gosub454:sys831,5:gosub455:gosub454:return
  407. 407 poke214,15:print:print"  [155][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][152]"
  408. 408 fori=1to3:print"                                      ":next
  409. 409 print"        [208]ublished on [204][207][193][196][211][212][193][210] #82     "
  410. 410 print"      [211]ubscriptions 1-800-831-2694    "
  411. 411 print"         [193] [211][207][198][212][196][201][211][203] [208]ublication       "
  412. 412 print"                                      "
  413. 413 print"  [151][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]"
  414. 414 a$="[215][193][201][211][212][160][195][207][206][212][210][207][204][204][197][210]  [214]1":poke214,17:print
  415. 415 printspc(20-len(a$)/2)"[152]"a$
  416. 416 a$="[194]y [203]en [203]owalewski   ([195]) 1991":poke214,18:print
  417. 417 printspc(20-len(a$)/2)"[152]"a$"":return
  418. 418 p=7:gosub271:print"[158]@ set calorie limit:     [158]\[144]":p=27:gosub271
  419. 419 gosub427:return
  420. 422 ifpl=12thencl=val(b$):return
  421. 423 open15,8,15,"r0:dfile=dfile":input#15,er:close15:ifer<>63then425
  422. 424 ifb%(pl)<>val(b$)thenopen15,8,15,"s0:dfile":close15
  423. 425 ifb%(pl)=val(b$)thenreturn
  424. 426 b%(pl)=val(b$):gosub549:return
  425. 427 b$="":poke198,0
  426. 428 gosub457:getx$:print"[144]-[157]";:ifx$=""then428
  427. 429 ifx$=a$andval(b$)<500andval(b$)thenprint" ":gosub437:goto427
  428. 430 ifx$=a$thenprint" ":gosub454:gosub422:return
  429. 431 ifx$=chr$(20)andlen(b$)thenb$=left$(b$,len(b$)-1):x$="[157]  [157][157]":goto436
  430. 432 iflen(b$)>3thengosub453:goto428
  431. 433 ifx$>="0"andx$<="9"then435
  432. 434 goto428
  433. 435 b$=b$+x$
  434. 436 gosub454:printx$;:goto428
  435. 437 gosub271:print"    ":gosub453:gosub271:return
  436. 438 ifclandb>clthengosub453:gosub453
  437. 439 return
  438. 440 o=a%(a,e)
  439. 441 ifo=94oro=105oro=226thenprint""right$(i$(o),len(i$(o))-4):return
  440. 442 ifo>12ando<22then451
  441. 443 ifo<3then451
  442. 444 ifo>94ando<105then451
  443. 445 ifo>87ando<91then451
  444. 446 ifo>165ando<169then451
  445. 447 ifo>276ando<286then451
  446. 448 ts=1:fortt=.to27:ift%(tt)=othengosub452:ts=.:t=27
  447. 449 next:ifts=.thenreturn
  448. 450 print""i$(o):return
  449. 451 gosub452:return
  450. 452 print""right$(i$(o),len(i$(o))-3):return
  451. 453 forw=.to50:pokev,15:pokev,.:next:return
  452. 454 forw=.to2:pokev,15:pokev,.:next:return
  453. 455 gosub457:getx$:ifx$<>a$then455
  454. 456 return
  455. 457 j=notpeek(s)and15:f=(peek(s)and16)/16
  456. 458 iff=.thenpoke631,13:poke198,1
  457. 459 ifj=1thenpoke631,145:poke198,1
  458. 460 ifj=2thenpoke631,17:poke198,1
  459. 461 ifj=4thenpoke631,45:poke198,1
  460. 462 ifj=8thenpoke631,43:poke198,1
  461. 463 return
  462. 464 open15,8,15,"r0:dfile=dfile":input#15,er:close15
  463. 465 ifer<>63thengosub535
  464. 466 open2,8,2,"0:dfile"
  465. 467 fori=.to10:input#2,n$(i):input#2,b%(i):next:close2
  466. 468 gosub539:print
  467. 469 printtab(6)"[152]enter your name / code word."
  468. 470 printtab(5)"10 characters or less, please."
  469. 471 printtab(13)"[144]@            \":printtab(15)"[145]";
  470. 472 gosub496:print"[147]"
  471. 473 ifq$=""thencl=0:pl=12:return
  472. 474 ct=0:ta=11:fori=.to10:ifn$(i)="\"thenta=ta-1:goto476
  473. 475 ifq$=n$(i)thenct=ct+1:pl=i
  474. 476 next
  475. 477 print:ifct=1thenprinttab(9)"[144][192][149][160][160][160][198][207][213][206][196][160][201][206][160][198][201][204][197][160][160][160][160][144][220]":cl=b%(pl):goto530
  476. 478 ifct>1then484
  477. 479 printtab(9)"[144][192][149][160][206][207][212][160][198][207][213][206][196][160][201][206][160][198][201][204][197][160][160][144][220]":gosub543:pl=12
  478. 480 ifta=11thenprinttab(9)"[144][192][149][206][207][160][210][207][207][205][160][204][197][198][212][160][201][206][160][198][201][204][197][144][220]":gosub543:goto516
  479. 481 fori=.to10:ifn$(i)="\"thenn$(i)=q$:pl=i:i=10
  480. 482 next:printtab(9)"[144][192][149][160][160][208][204][193][195][201][206][199][160][201][206][160][198][201][204][197][160][160][144][220]":gosub543
  481. 483 gosub547:return
  482. 484 kt=65:pl=12:gosub544:fori=.to10:ifq$=n$(i)thengosub508
  483. 485 next:gosub545
  484. 486 printtab(7)"[152]pick letter of file to use":printtab(19)"or"
  485. 487 printtab(7)"press [144][192][149][210][197][212][213][210][206][144][220][152] to continue"
  486. 488 print
  487. 489 getx$:ifx$<>a$thenifx$<"a"orx$>chr$(kt)then489
  488. 490 gosub454:ifx$=a$thencl=0:pl=12:goto516
  489. 491 printtab(8)"keep calories as is?[144][192][149][217][175][206][144][220]"
  490. 492 pl=e(asc(x$)-65):n$(pl)=q$
  491. 493 gety$:ify$<>"y"andy$<>"n"then493
  492. 494 gosub454:ify$="y"thencl=b%(pl):return
  493. 495 b%(pl)=0:cl=0:return
  494. 496 q$=""
  495. 497 getx$:print"[144]-[157]";:ifx$=""then497
  496. 498 gosub454:ifx$=a$andq$=""thenprint" ":return
  497. 499 ifx$=a$thenprint" ":gosub554:return
  498. 500 ifx$=chr$(20)andlen(q$)thenq$=left$(q$,len(q$)-1):x$="[157]  [157][157]":goto507
  499. 501 iflen(q$)>9thengosub453:goto497
  500. 502 ifx$>="0"andx$<="9"then506
  501. 503 ifx$>="a"andx$<="z"then506
  502. 504 ifx$=" "then506
  503. 505 goto497
  504. 506 q$=q$+x$
  505. 507 print""x$;:goto497
  506. 508 g$=str$(b%(i)):printtab(5)"[144] "chr$(kt)"  ";
  507. 509 ifn$(i)="\"thenprint"          :";:goto511
  508. 510 printn$(i)":";
  509. 511 ifb%(i)=0thenj$=" 0000"
  510. 512 ifb%(i)>1000thenj$=" 0"+right$(g$,len(g$)-2)
  511. 513 ifb%(i)>999thenj$=g$
  512. 514 printj$" calories ":e(kt-65)=i:kt=kt+1
  513. 515 return
  514. 516 print"[147]"
  515. 517 kt=65:gosub544:fori=.to10:gosub508:next:gosub545
  516. 518 print
  517. 519 print"[152]  press [144][192][196][144][220][146][152] to delete / [144][192][210][144][220][146][152] to replace"
  518. 520 printtab(9)"press [144][192][210][197][212][213][210][206][144][220][146][152] to exit":sys828,3
  519. 521 gety$:ify$<>"d"andy$<>"r"andy$<>a$then521
  520. 522 gosub454:ify$=a$thengosub547:return
  521. 523 printtab(10)"[144]@pick a file letter[144]\"
  522. 524 getx$:ifx$<>a$thenifx$<"a"orx$>"k"then524
  523. 525 ifx$=a$thengosub547:return
  524. 526 gosub454:kt=asc(x$)-65:b%(kt)=0
  525. 527 ify$="d"thenn$(kt)="\":pl=12
  526. 528 ify$="r"thenn$(kt)=q$:pl=kt
  527. 529 print"":sys831,3:goto517
  528. 530 i=pl:kt=65:print:gosub544:gosub508
  529. 531 gosub545:print"  [152]press [144][192][213][220][152] to use, [144][192][195][220][152] to create file"
  530. 532 getx$:ifx$<>"u"andx$<>"c"then532
  531. 533 gosub454:ifx$="u"thenreturn
  532. 534 cl=0:goto480
  533. 535 open2,8,2,"dfile,p,w":n$="\":cl%=0:fori=.to10
  534. 537 print#2,n$a$cl%a$;:next:print#2:close2:return
  535. 539 print"[147]"tab(10)"[144][255][160][215][193][201][211][212][160][195][207][206][212][210][207][204][204][197][210][160][223]"
  536. 540 print" [144]@a nutritional guide to better eating[144]\"
  537. 541 printspc(10)"[144][168][151][194][217][160][160][203][197][206][160][203][207][215][193][204][197][215][211][203][201][144][169]":return
  538. 542 l$=str$(l):gosub271:gosub320:print"[158]"l$:return
  539. 543 forde=.to2500:next:return
  540. 544 printtab(5)"[144]^                            _":return
  541. 545 printtab(5)"[144](                            )":return
  542. 546 p=(21-(len(a$(te)))/2):gosub271:return
  543. 547 printtab(13)"[150]saving to disk"
  544. 548 open15,8,15,"s0:dfile":close15
  545. 549 open2,8,2,"dfile,p,w"
  546. 550 fori=.to10:iflen(n$(i))=10orlen(n$(i))=0orn$(i)="\"then552
  547. 551 forj=len(n$(i))to9:n$(i)=n$(i)+" ":next
  548. 552 iflen(n$(i))=0thenn$(i)="\"
  549. 553 print#2,n$(i)a$b%(i)a$;:next:print#2:close2:return
  550. 554 iflen(q$)=10thenreturn
  551. 555 fori=len(q$)to9:q$=q$+" ":next:return
  552. 556 getx$:ifx$<>"y"andx$<>"n"then556
  553. 557 gosub454:ifx$="n"thenreturn
  554. 558 print"[147]"
  555. 559 p=3:gosub271:print"[144]@clearing memory...please wait...\":b=.:d=.
  556. 560 fore=.to4:ifl%(e)=.then563
  557. 561 l%(e)=.:forz=.to25:a%(e,z)=.:c%(e,z)=.:e%(e,z)=.:next
  558. 562 forz=.to328:s%(e,z)=.:next
  559. 563 next:return
  560. 10000 open15,8,15,"s0:waist control":close15:save"waist control",8:end
  561.